package com.demo.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {

    @Select("SELECT user_id from user where user_name = #{userName} and user_password = #{userPassword}")
    Integer login(int userName, String userPassword);

    @Insert("INSERT INTO user (user_name, user_password) VALUES (#{userName}, #{userPassword})")
    void createNew(Integer userName, String userPassword);
}
